package com.davidhigenbottam.HeatMap.client;

import com.davidhigenbottam.HeatMap.shared.Query;

public class InstitutionOverlayData {
	
	
	
	KmlLayer kmlOverlay= null;
	Query query;
	InstitutionTable institutionTable = new InstitutionTable();

	public InstitutionOverlayData(Query q) {
		query = q;
	}


	public InstitutionTable getInstitutionTable() {
		return institutionTable;
	}


	public boolean isHidden() {
		return !institutionTable.isVisible();
	}

	public void show() {
		institutionTable.show();
		//if(geoXmlOverlay==null)
		//	return;
		//geoXmlOverlay.setVisible(true);
		
	}

	public void hide() {
		institutionTable.hide();
		if(kmlOverlay==null)
			return;
		kmlOverlay.setVisible(false);
	}

	public KmlLayer getOverlay() {
		return kmlOverlay;
	}

	public void setOverlay(KmlLayer overlay) {
		this.kmlOverlay = overlay;
	}

	public Query getQuery() {
		return query;
	}

	public void setQuery(Query query) {
		this.query = query;
	}
	
//	public LatLngBounds getCenter(){
//	//	if(this.getOverlay()==null)
//	//		return UI.getInstance().mapDefaultCenter;
//		return this.getOverlay().getDefaultCenter();
//	}
//	

}
